package oop5;

import oop4.Pet;

/**
 * @author oldliu
 * @since 1.0
 */
public class Cat extends Pet {
    public Cat(String name, int health, int love, String sex) {
        super(name, health, love, sex);
    }

    @Override
    public void print() {
        System.out.println("这是一只猫");
        System.out.println("他的名字叫"+super.getName());
        System.out.println("性别是"+getSex());
    }
    //不能再重写
    public final void catchMouse(String m){
        System.out.println(super.getName()+"抓住了老鼠"+m);
    }

}
